<template>
  <div>
    <router-link to="/"></router-link>
    <div class="rno-4-hero-group" v-show="$route.meta.isShow">
      <div class="rno-4-hero">
        <div class="rno-4-hero-inner">
          <figure class="rno-4-hero-ct">
            <div class="rno-4-hero-search-hd">
              <h2 class="rno-4-hero-tit">新闻资讯</h2>
              <img class="rno-4-hero-logo" src="https://cloudcache.tencent-cloud.com/open_proj/proj_qcloud_v2/platform/documents/css/img/rno-4-hero-logo.png" alt="摘新新闻">
            </div>

            <div class="rno-4-hero-search-wrap">
              <input type="text" class="rno-4-hero-search-input" placeholder="请输入关键词搜索新闻" v-model="key" @keydown.enter="sentKey">
              <el-button icon="el-icon-search" @click="sentKey" class="search"></el-button>
<!--              <router-link :to="{path:'/search',query:{key:key}}"><el-button icon="el-icon-search" ></el-button></router-link>-->


            <div class="rno-4-hero-search-list-wrap">
              <ul class="rno-4-hero-search-list rno-scrollbar" ></ul>
            </div>

          </div>
          </figure>
        </div>
      </div>

    </div>
    <router-view></router-view>

  </div>

</template>

<script>

export default {
  name: 'news',
  data () {
    return {
      num: 1,
      key:'',
      activeIndex: '1',
      activeIndex2: '1',
    }
  },
  // created() {
  //   this.getPic()
  // },
  methods: {
    sentKey(){
      this.$router.push({name: 'search', params: {key: this.key}})
    }
  }
}
</script>
<style>
.fakeimg {
  height: 200px;
  background: #aaa;
  width: 300px;
}
</style>
<style>
.rno-4-hero-group .search{
  position: absolute;
  top: -4px;
  left: 478px;
  height: 48px;
}
.rno-4-hero-group{
  min-width: 320px;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #ECF0F1;
  -webkit-font-smoothing: antialiased;
  background-image: url('./images/img.png');
  background-size: auto 420px;
}

.rno-4-hero{
  margin-top: -56px;
}
.rno-4-hero-inner{
  box-sizing: border-box;
  margin: 0 auto;
  padding: 0 10px;
  max-width: 1200px;
  height: 420px;
  color: #fff;
  line-height: 1.5;
  font-size: 0;
  position: relative;
}
.rno-4-hero-ct{
  display: inline-block;
  vertical-align: middle;
  width: 480px;
  padding-top: 134px;
}
.rno-4-hero-search-hd {
  overflow: hidden;
  position: relative;
}
.rno-4-hero-tit {
  font-size: 40px;
  font-weight: 400;
  line-height: 50px;
  color: #16181A;
}
.rno-4-hero-logo {
  position: absolute;
  right: -99999px;
}
.rno-4-hero-search-wrap {
  position: relative;
  margin-top: 32px;
  z-index: 10;
  border: 2px solid #FFF;
  box-shadow: 20px 20px 20px 0 rgba(55,99,170,.2);
}
.rno-4-hero-search-btn {
  width: 38px;
  border-radius: 0;
  font-size: 0;
  height: 38px;
  border: none;
  vertical-align: top;
  position: absolute;
  right: 1px;
  top: 1px;
  background-color: transparent;
  outline: 0;
}
.rno-4-hero-search-list-wrap {
  position: absolute;
  top: 44px;
  left: 0;
  width: 100%;
  box-sizing: border-box;
  background-color: #fff;
  box-shadow: #eee 2px 2px 0;
  box-shadow: 0 0 6px 0 rgba(0,0,0,.08),0 4px 6px 0 rgba(0,0,0,.1);
  z-index: 1;
  border-radius: 2px;
  font-size: 14px;
  line-height: 24px;
  text-align: left;
}
.rno-4-hero-search-tip {
  font-size: 14px;
  padding: 15px 0;
  text-align: left;
}
.rno-4-hero-search-input {
  display: block;
  height: 40px;
  width: 100%;
  padding: 4px 40px 4px 16px;
  font-size: 16px;
  border: none;
  appearance: none;
  box-sizing: border-box;
  background-image: linear-gradient(0deg,#FFF 0,#F3F5F8 100%);
  outline: 0;
  caret-color: #00a4ff;
}
.rno-4-hero-search-tip {
  font-size: 14px;
  padding: 15px 0;
  text-align: left;
}
.rno-4-hero-search-tip>a {
  color: #97A9BC;
  margin-right: 10px;
}
.rno-4-hero-search-tip>span {
  color: #97A9BC;
}

</style>



